package graduate.cslg.com.universityshopping.net;

import okhttp3.MultipartBody;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import rx.Observable;

public interface AccountService {

    @Multipart
    @POST("/SSMDemo/register")
    Observable<RegisterResponse> RegisterCheck(@Part("user_account") String userAccount, @Part("user_password") String userPassword, @Part("user_phone") String userPhone, @Part("user_name") String userName, @Part MultipartBody.Part part, @Part("user_type") int userType);

    @FormUrlEncoded
    @POST("/SSMDemo/getUserName")
    Observable<CardResponse> getCardInfo(@Field("user_account") String userAccount);

    @FormUrlEncoded
    @POST("/SSMDemo/updatePassword")
    Observable<LoginResponse> isUpdate(@Field("user_account") String userAccount, @Field("user_password") String userPassword, @Field("user_phone") String userPhone, @Field("user_name") String userName);

    @FormUrlEncoded
    @POST("/SSMDemo/pickRegister")
    Observable<LoginResponse> pickRegister(@Field("card_name") String cardName, @Field("card_account") String cardAccount, @Field("user_tel") String userTel);

    @FormUrlEncoded
    @POST("/api/Account/CardPick")
    Observable<CardPickResponse> cardPickCheck(@Field("name") String YourName, @Field("card_id") String cardId, @Field("phone") String phone);


}
